<?php

namespace addons\oil\validate;

use think\Validate;

class Invoice extends Validate
{

    /**
     * 验证规则
     */
    protected $rule = [
        'id' => 'require',
        'order_ids' => 'require',
        'type' => 'require',
        'header_type' => 'require',
        'header_title' => 'require',
        'header_num' => 'require',
    ];

    /**
     * 提示消息
     */
    protected $message = [
        'id.require' => '缺少参数',
        // 创建订单
        'order_ids.require' => '请选择开票订单',
        'type.require' => '请确定开票类型',
        'header_type.require' => '请选择抬头类型',
        'header_title.require' => '请输入发票抬头',
        'header_num.require' => '请输入发票税号或身份证号',


    ];

    /**
     * 字段描述
     */
    protected $field = [
        
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'createInvoice' => ['order_ids','type','header_type','header_title','header_num'],
        'recreateInvoice' => ['id','header_type','header_title','header_num'],
    ];

}
